<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html >
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title><?php echo ($tpshop_config['shop_info_store_title']); ?></title>
<meta http-equiv="keywords" content="<?php echo ($tpshop_config['shop_info_store_keyword']); ?>" />
<meta name="description" content="<?php echo ($tpshop_config['shop_info_store_desc']); ?>" />
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
	<link rel="stylesheet" href="/Template/mobile/new/Static/css/iconfont/iconfont.css">
<?php if($is_ios != ''): ?><div style="margin:0 auto;padding:4px 0;width:100%;background: #3cca36; color:#fff;">
        <?php if($_GET[act] != 1): ?><a href="javascript:history.go(-1)" style="font-size:14px;color:#fff;"><img src="/Template/mobile/new/Static/images/back.png" style="vertical-align: middle;" width="16"   />返回 </a><?php endif; ?>
        <div style="float:right;font-size:12px;margin-right:5px;"><a href="<?php echo U('Mobile/Index/index');?>" style="color:#fff;"><i class="icon iconfont icon-shouye" style="margin-right:4px;"></i>首页</a></div>
    </div><?php endif; ?>
<link rel="stylesheet" type="text/css" href="/Template/mobile/new/Static/css/public.css"/>
<link rel="stylesheet" type="text/css" href="/Template/mobile/new/Static/css/catalog.css"/>
<script type="text/javascript" src="/Template/mobile/new/Static/js/jquery.js"></script>
<script src="/Public/js/global.js"></script>
<style>
.goods_nav{ width:30%; float:right; right:5px; overflow:hidden; position:fixed;margin-top:25px; z-index:9999999}
</style>
</head>
<body>
<!--分类切换-->


<div class="container">
	<ul id="catelist_top_box">

        <li><a href="<?php echo U('Goods/categoryList/cate_id/60');?>"   <?php if($cate_id == 60): ?>class="cur<?php endif; ?>"><i class="icon iconfont icon-shuiping"></i>VIP套餐</a></li>
        <li><a href="<?php echo U('Goods/categoryList/cate_id/52');?>"   <?php if($cate_id == 52): ?>class="cur<?php endif; ?>"><i class="icon iconfont icon-paobu"></i>私教课程</a></li>
        <li><a href="<?php echo U('Goods/categoryList/cate_id/53');?>"   <?php if($cate_id == 53): ?>class="cur<?php endif; ?>"><i class="icon iconfont icon-liebiao1"></i>小课程</a></li>



        <?php if(is_array($category_list)): foreach($category_list as $key=>$v): ?><li style="display: none;"><a href="<?php echo U('categoryList',array('cate_id'=>$v[id]));?>"   <?php if($cate_id == $v[id]): ?>class="cur"<?php endif; ?>  ><i class="icon iconfont icon-<?php if($v[id] == 1): ?>paobu<?php elseif($v[id] == 2): ?>shuiping<?php else: ?>liebiao1<?php endif; ?>"></i><?php echo ($v["name"]); ?></a></li><?php endforeach; endif; ?>
    </ul>
    
  <div class="category-box">
    <div class="category1" style="outline: none;" tabindex="5000">
      <ul class="clearfix" >

          <?php if(is_array($cate_2_list)): foreach($cate_2_list as $key=>$v1): ?><li   <?php if($cate2_id == $v1[id]): ?>class="cur"<?php endif; ?>   ><a href="<?php echo U('categoryList',array('cate_id'=>$cate_id,'cate2_id'=>$v1[id]));?>"><?php echo ($v1["name"]); ?></a></li><?php endforeach; endif; ?>



<!--
               <li class="cur"  data-id="1">碳酸饮料</li>
               <li  data-id="1">运动饮品</li>
               <li  data-id="1">茶饮料</li>
               <li  data-id="1">奶制品</li>
               <li  data-id="1">矿泉水</li>
               <li  data-id="1">果汁</li>-->
      </ul>
    </div>
    <div class="category2" style=" outline: none;" tabindex="5001">

        <?php if(empty($list)): ?><div class="screen-wrap fullscreen login">
                <section id="cart-content">
                    <div class="qb_tac" style="padding:50px 0">
                        <img src="/Template/mobile/new/Static/images/flow/empty_cart.png" width="170" >
                        <br>暂无课程信息</div>

                </section>
                <div style="height:72px;"></div>
                <section class="f_mask" style="display: none;"></section>
                <section class="f_block" id="choose" style="height:0px;"></section>
            </div><?php endif; ?>
      <dl style="padding-bottom:50px;display:block;" >
       		<ul id="prolist">

                <?php if(is_array($list)): foreach($list as $k=>$goods): ?><li><a href="<?php echo U('goodsInfo',array('id'=>$goods[goods_id]));?>"><img src="<?php echo ($goods["original_img"]); ?>" ><span><?php echo ($goods["goods_name"]); ?><b>￥<?php echo ($goods["shop_price"]); ?></b></span> </a></li><?php endforeach; endif; ?>

            </ul>
      </dl>
      
    </div>
  </div>
</div>
<!---切换js----->

<div class="v_nav">
	<div class="vf_nav">
		<ul>

			<li> <a href="<?php echo U('Mobile/Index/index');?>" <?php if($navid == 'home'): ?>class="act"<?php endif; ?> >
			    <i class="icon iconfont icon-shouye"></i>
			    <span>首页</span></a></li>

           	<?php if($_SESSION[is_coach]!=1){ ?>
                <li><a href="<?php echo U('Goods/categoryList');?>" <?php if($navid == 'shop'): ?>class="act"<?php endif; ?> >
                    <i class="icon iconfont icon-paobu fontbao"></i>
                    <span>商城</span></a></li>
                    
                <li><a href="<?php echo U('Coach/coach_list');?>" <?php if($navid == 'coach'): ?>class="act"<?php endif; ?> >
                    <i class="icon iconfont icon-juzhong"></i>
                    <span>教练</span></a></li>
                <li><a href="<?php echo U('Cart/cart');?>" <?php if($navid == 'cart'): ?>class="act"<?php endif; ?> >
                    <i class="icon iconfont icon-gouwuche fontshop"></i>
                    <span>购物车</span></a></li>
            <?php } ?>
           
			<!--<li>-->
			<!--<a href="<?php echo U('Cart/cart');?>">-->
			   <!--<em class="global-nav__nav-shop-cart-num" id="cart_quantity" style="right:9px;"></em>-->
			   <!--<i class="vf_4"></i>-->
			   <!--<span>购物车</span>-->
			   <!--</a>-->
			<!--</li>-->
			<?php if($_SESSION['is_coach']){ ?>
			<li><a href="<?php echo U('Yuyue/coach_detail');?>" <?php if($navid == 'yuyue'): ?>class="act"<?php endif; ?> >
			    <i class="icon iconfont icon-calendar"></i>
				<span>预约</span></a>
			</li>
			<?php }else{ ?>
			<li style="display:none;"><a href="<?php echo U('Yuyue/coach_list');?>" <?php if($navid == 'yuyue'): ?>class="act"<?php endif; ?>  >
			    <i class="icon iconfont icon-calendar"></i>
				<span>预约</span></a>
			</li>
			<?php } ?>


			<!--<li><a href="<?php echo U('Yuyue/coach_list');?>">-->
				<!--<i class="vf_5"></i>-->
				<!--<span>预约</span></a>-->
			<!--</li>-->
			<li><a href="<?php echo U('User/index');?>" <?php if($navid == 'user'): ?>class="act"<?php endif; ?>>
			    <i class="icon iconfont icon-gerenzhongxin"></i>
			    <span>我的</span></a>
			</li>
		</ul>
	</div>
</div> 
<script type="text/javascript">
$(document).ready(function(){
	  var cart_cn = getCookie('cn');
	  if(cart_cn == ''){
		$.ajax({
			type : "GET",
			url:"/index.php?m=Home&c=Cart&a=header_cart_list",//+tab,
			success: function(data){								 
				cart_cn = getCookie('cn');
				$('#cart_quantity').html(cart_cn);						
			}
		});	
	  }
	  $('#cart_quantity').html(cart_cn);
});
</script>

<?php if($_GET[act] == 1): ?><script>
    XBack = {};

    (function(XBack) {
        XBack.STATE = 'x - back';
        XBack.element;

        XBack.onPopState = function(event) {
            event.state === XBack.STATE && XBack.fire();
            XBack.record(XBack.STATE); //初始化事件时，push一下
        };

        XBack.record = function(state) {
            history.pushState(state, null, location.href);
        };

        XBack.fire = function() {
            var event = document.createEvent('Events');
            event.initEvent(XBack.STATE, false, false);
            XBack.element.dispatchEvent(event);
        };

        XBack.listen = function(listener) {
            XBack.element.addEventListener(XBack.STATE, listener, false);
        };

        XBack.init = function() {
            XBack.element = document.createElement('span');
            window.addEventListener('popstate', XBack.onPopState);
            XBack.record(XBack.STATE);
        };

    })(XBack); // 引入这段js文件

    XBack.init();
    XBack.listen(function() {});
</script><?php endif; ?>
<!-- 微信浏览器 调用微信 分享js-->
<?php if($signPackage != null): endif; ?>
<!-- 微信浏览器 调用微信 分享js  end-->
<script>

$(function () {
    //滚动条
    $(".category1,.category2").niceScroll({ cursorwidth: 0,cursorborder:0 });

    //图片延迟加载
 	//$(".lazyload").scrollLoading({ container: $(".category2") });
    //$('.category-box').height($(window).height());

    //点击切换2 3级分类
	var array=new Array();
	$('.category1 li').each(function(){ 
		array.push($(this).position().top-0);
	});
	
	$('.category1 li').click(function() {
		var index=$(this).index();
		$('.category1').delay(200).animate({scrollTop:array[index]},300);
		$(this).addClass('cur').siblings().removeClass();
		$('.category2 dl').eq(index).show().siblings().hide();
        $('.category2').scrollTop(0);
	});

});
</script>
<script src="/Template/mobile/new/Static/js/jquery.nicescroll.min.js"></script> 
</body>
</html>